package com.leyou.trade.config;

import com.leyou.auth.com.leyou.auth.utils.UserContext;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

@Component
public class JwtInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate template) {
        template.header("Cookie", "LY_TOKEN=" + UserContext.getJwt());
    }
}